#include <iostream>
#include "amgraph.h"

using namespace std;

int main()
{

    //G=({A,B,C,D,E},{AB,AC,BE,CB,CD,EA,ED})
    AMGraph<char, int> G;
    InitGraph(G);

    int a = AddVertex(G, 'A');
    int b = AddVertex(G, 'B');
    int c = AddVertex(G, 'C');
    int d = AddVertex(G, 'D');
    int e = AddVertex(G, 'E');

    AddArc(G, a, b, 1);
    AddArc(G, a, c, 1);
    AddArc(G, b, e, 1);
    AddArc(G, c, b, 1);
    AddArc(G, c, d, 1);
    AddArc(G, d, b, 1);
    AddArc(G, e, a, 1);
    AddArc(G, e, d, 1);

    auto print = [](char c) { cout << c; };
    cout << "DFSTraverse:";
    DFSTraverse(G, print);
    cout << "\nBFSTraverse:";
    DFSTraverse(G, print);
    DestroyGraph(G);

    return 0;
}